<template>
    <div>
        <div class="container">
            <div class="handle-box">
                <el-select v-model="query.case_source" @change="handleSearch(query.case_number,query.tcs_note_id,query.case_source,query.case_type)" clearable placeholder="案件来源" class="handle-select mr10">
                    <el-option key="1" label="市场查获" value="市场查获"></el-option>
                    <el-option key="2" label="投诉举报" value="投诉举报"></el-option>
                    <el-option key="3" label="上级交办" value="上级交办"></el-option>
                </el-select>
                <el-select v-model="query.case_type" @change="handleSearch(query.case_number,query.tcs_note_id,query.case_source,query.case_type)" clearable placeholder="案件性质" class="handle-select mr10">
                    <el-option key="1" label="一般案件" value="一般案件"></el-option>
                    <el-option key="2" label="简易案件" value="简易案件"></el-option>
                </el-select>
                <el-input v-model="query.case_number" placeholder="立案编号" @change="handleSearch(query.case_number,query.tcs_note_id,query.case_source,query.case_type)" class="handle-input mr10"></el-input>
                <el-button type="primary" :icon="Search" @change="handleSearch(query.case_number,query.tcs_note_id,query.case_source,query.case_type)">搜索</el-button>
            </div>
            <el-table :data="tableList" border class="table" ref="multipleTable" header-cell-class-name="table-header">
                <!--        <el-table-column prop="case_id" label="案件号" width="100" align="center"></el-table-column>-->
                <el-table-column prop="case_source" label="案件来源" align="center"></el-table-column>
                <el-table-column prop="case_number" label="立案编号"  align="center" width="200"></el-table-column>
                <el-table-column prop="case_update_time" label="更新时间"  align="center"></el-table-column>
                <el-table-column prop="case_type" label="案件性质" align="center"></el-table-column>
                <el-table-column prop="date_of_filing" label="立案日期"  align="center"></el-table-column>
                <el-table-column label="案件处理审批状态" align="center" width="180">
                    <template #default="scope">
                        <div v-if="scope.row.tcs_note_id === '听证已完成' ">
                            <el-tag :type=" 'danger'">案件处理审批已开始 </el-tag>
                        </div>
                        <div v-if="scope.row.tcs_note_id === '案件处理审批已开始' ">
                            <el-tag :type=" 'danger'">案件处理审批已开始 </el-tag>
                        </div>

                        <div v-if="scope.row.tcs_note_id === '已完成' ||
                                scope.row.tcs_note_id === '无证经营公示已完成' ||
                                scope.row.tcs_note_id ==='案件处理审批已完成'||
                                scope.row.tcs_note_id ==='行政处罚事先告知书确认完成'||
                                scope.row.tcs_note_id ==='行政处罚事先告知书已完成'||
                                scope.row.tcs_note_id ==='行政处罚决定书确认完成'||
                                scope.row.tcs_note_id ==='行政处罚决定书已完成'||
                                scope.row.tcs_note_id ==='行政罚款收据上传完成'||
                                scope.row.tcs_note_id ==='行政罚款收据已完成'||
                                scope.row.tcs_note_id ==='结案报告表已完成'">
                            <el-tag :type=" 'success'">已完成 </el-tag>
                        </div>
                    </template>
                </el-table-column>
                <el-table-column label="下一步操作" width="300" align="center">
                    <template #default="scope">
                        <div v-if="scope.row.tcs_note_id === '听证已完成'||scope.row.tcs_note_id === '案件处理审批已开始' ">
                            <el-button text :icon="Edit" class="blue" @click="case_handling_tabel(scope.row)" >
                                案件处理审批表查看及确认
                            </el-button>
                        </div>

                        <div v-if="scope.row.tcs_note_id === '已完成' ||
                                scope.row.tcs_note_id === '无证经营公示已完成' ||
                                scope.row.tcs_note_id ==='案件处理审批已完成'||
                                scope.row.tcs_note_id ==='行政处罚事先告知书确认完成'||
                                scope.row.tcs_note_id ==='行政处罚事先告知书已完成'||
                                scope.row.tcs_note_id ==='行政处罚决定书确认完成'||
                                scope.row.tcs_note_id ==='行政处罚决定书已完成'||
                                scope.row.tcs_note_id ==='行政罚款收据上传完成'||
                                scope.row.tcs_note_id ==='行政罚款收据已完成'||
                                scope.row.tcs_note_id ==='结案报告表已完成'">
                            <el-button text :icon="Edit" class="blue" @click="case_handling_tabel_browse(scope.row)" >
                                查看案件处理审批表
                            </el-button>
                        </div>


                    </template>
                </el-table-column>
            </el-table>
          <div class="pagination">
            <el-pagination
                background
                layout="total, prev, pager, next"
                :current-page="query.pageIndex"
                :page-size="query.pageSize"
                :total="pageTotal"
                @current-change="handlePageChange"
            ></el-pagination>
          </div>


        <el-dialog title="案件处理审批表填写" v-model="Case_handing_approve_Visible" width="55%">
            <el-form ref="form"  :model="form" label-width="100px">
                <el-form-item label="案由">
                    <el-input  v-model="case_handing_data_storage.case_cause" ></el-input>
                </el-form-item>
                <el-row >
                    <el-col :span="12">
                        <el-form-item label="立案编号">
                            <el-input :disabled="true" v-model="case_handing_data_storage.case_number" ></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="立案时间">
                            <el-input :disabled="true"  v-model="case_handing_data_storage.case_time"></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row >
                    <el-col :span="12">
                        <el-form-item label="名称">
                            <el-input  v-model="case_handing_data_storage.name" ></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="法定负责人">
                            <el-input  v-model="case_handing_data_storage.statutory_responsible_person"></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row >
                    <el-col :span="12">
                        <el-form-item label="地址">
                            <el-input  v-model="case_handing_data_storage.address" ></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="电话">
                            <el-input  v-model="case_handing_data_storage.tel"></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row >
                    <el-col :span="8">
                        <el-form-item label="当事人姓名">
                            <el-input  v-model="case_handing_data_storage.tir_person" ></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="8">
                        <el-form-item label="性别">
                            <el-input  v-model="case_handing_data_storage.tir_gender" ></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="8">
                        <el-form-item label="民族">
                            <el-input  v-model="case_handing_data_storage.tir_nation"></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row >
                    <el-col :span="12">
                        <el-form-item label="身份证号">
                            <el-input  v-model="case_handing_data_storage.tir_id_number" ></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="12">
                        <el-form-item label="许可证号">
                            <el-input v-model="case_handing_data_storage.retail_licence_code"></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row >
                    <el-col :span="8">
                        <el-form-item label="联系电话">
                            <el-input  v-model="case_handing_data_storage.telephone_number" ></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="8">
                        <el-form-item label="犯案次数">
                            <el-input  v-model="case_handing_data_storage.crime_number"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="8">
                        <el-form-item label="同案人">
                            <el-input  v-model="case_handing_data_storage.conspirator"></el-input>
                        </el-form-item>
                    </el-col>

                </el-row>
                <el-form-item label="住址">
                    <el-input  v-model="case_handing_data_storage.tir_home"></el-input>
                </el-form-item>
                <el-row >
                    <el-col :span="8">
                        <el-form-item label="承办人">
                            <el-select v-model="case_handing_data_storage.undertaker1" @change="get_interrogator_clause_opinion(case_handing_data_storage.undertaker1)" clearable filterable placeholder="请选择">
                                <el-option
                                        v-for="(item,index) in interrogator_Data"
                                        :key='index'
                                        :label='item.staff_name'
                                        :value='item.staff_id'
                                ></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :span="8">
                        <el-form-item label="承办人">
                            <el-select v-model="case_handing_data_storage.undertaker2" @change="get_interrogator_clause_opinion(case_handing_data_storage.undertaker2)" clearable filterable placeholder="请选择">
                                <el-option
                                        v-for="(item,index) in interrogator_Data"
                                        :key='index'
                                        :label='item.staff_name'
                                        :value='item.staff_id'
                                ></el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :span="8">
                        <el-form-item label="填写时间">
                            <el-date-picker v-model="case_handing_data_storage.write_time"  type="datetime" placeholder="选择填写时间" value-format="YYYY-MM-DD HH:mm:ss">
                            </el-date-picker>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-form-item label="卷烟来历">
                    <el-input v-model="case_handing_data_storage.cigarette_origin" type="textarea" rows="4" class="el-input"   ></el-input>
                </el-form-item>
                <el-form-item label="违反法律">
                    <el-input v-model="case_handing_data_storage.violate_law" type="textarea" rows="4" class="el-input"   ></el-input>
                </el-form-item>
                <el-row >
                    <el-col :span="11">
                        <el-form-item label="裁量标准">
                            <el-select v-model="case_handing_data_storage.discretionary_standard"   @change="get_discretionary_standard_clause_opinion(case_handing_data_storage.discretionary_standard)" clearable filterable placeholder="请选择">
                                <el-option
                                        v-for="(item,index) in discretionary_standard_Data"
                                        :key='index'
                                        :label='item.law_name_grade_punish'
                                        :value='item.discretionary_id'
                                >

                                </el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :span="8">
                        <el-form-item label="处罚金额">
                            <el-input v-model="case_handing_data_storage.penalty_money" class="el-input" ></el-input>
                        </el-form-item>
                    </el-col>

                </el-row>
<!--                <el-form-item >-->
<!--                    <el-input type="textarea" rows="2" :disabled="true"  class="el-input" ></el-input>-->
<!--                </el-form-item>-->
                <el-form-item label="处罚决定">
                    <el-input type="textarea" v-model="case_handing_data_storage.penalty_decision" rows="4" class="el-input"   ></el-input>
                </el-form-item>
                <el-form-item label="处罚依据">
                    <el-input type="textarea" v-model="case_handing_data_storage.punish_basis" rows="4" class="el-input"   ></el-input>
                </el-form-item>

            </el-form>

            <template #footer>
              <span class="dialog-footer">
                  <el-button @click="Case_handing_approve_Visible = false">取 消</el-button>
        <el-button type="primary" @click="certain_case_handing_approve">确 定</el-button>
              </span>
            </template>
        </el-dialog>
    </div>


    <!--    //查看案件处理审批表-->
    <el-dialog title="" v-model="View_case_handing_Visible" width="43%">
        <html>
        <head>
            <title>案件处理审批表</title>
        </head>
        <body>
        <h1 align="center">
            福建省闽侯县烟草专卖局
        </h1>
        <h1 align="center">
            案件处理审批表
        </h1>
        <table border="1"  style="border-collapse: collapse;" width="100%">
            <tr>
                <th colspan="1" width="15%">案由</th>
                <th colspan="8">{{case_handing_data_storage.illegal_behavior}}</th>
            </tr>
            <tr>
                <th colspan="1" width="15%">立案编号</th>
                <th colspan="5" width="34%">侯烟立[{{case_handing_data_storage.year}}]第{{case_handing_data_storage.case_number}}号</th>
                <th colspan="2" width="18%">立案时间</th>
                <th colspan="1" width="33%">{{case_handing_data_storage.year}}年{{case_handing_data_storage.month}}月{{case_handing_data_storage.day}}日</th>
            </tr>
            <tr>
                <th rowspan="4" colspan="1" width="15%">当事人</th>
                <th  colspan="1" width="4%">名称</th>
                <th colspan="4" width="30%">{{case_handing_data_storage.name}}</th>
                <th  colspan="2" width="18%">法定代表人（负责人）</th>
                <th  colspan="1" width="33%">{{case_handing_data_storage.statutory_responsible_person}}</th>
            </tr>
            <tr>
                <th  colspan="1" width="4%">地址</th>
                <th colspan="4" width="30%">{{case_handing_data_storage.address}}</th>
                <th  colspan="2" width="17%">联系电话</th>
                <th  colspan="1" width="34%">{{case_handing_data_storage.tel}}</th>
            </tr>
            <tr>
                <th  colspan="1" width="4%">姓名</th>
                <th colspan="1" width="4%">{{case_handing_data_storage.tir_person}}</th>
                <th  colspan="1" width="8%">性别</th>
                <th  colspan="1" width="8%">{{case_handing_data_storage.tir_gender}}</th>
                <th  colspan="1" width="6%">民族</th>
                <th colspan="1" width="8%">{{case_handing_data_storage.tir_nation}}</th>
                <th  colspan="1" width="9%">证件名称及号码</th>
                <th  colspan="1" width="38%">身份证号：{{case_handing_data_storage.tir_id_number}}<br>
                    烟草专卖零售许可证号：{{case_handing_data_storage.retail_licence_code}}</th>
            </tr>
            <tr>
                <th  colspan="2" width="8%">住址</th>
                <th colspan="2" width="16%">{{case_handing_data_storage.tir_home}}</th>
                <th  colspan="3" width="23%">联系电话</th>
                <th  colspan="1" width="38%">{{case_handing_data_storage.telephone_number}}</th>
            </tr>
            <tr>
                <th colspan="1" width="15%">同案人</th>
                <th colspan="8">{{case_handing_data_storage.conspirator}}</th>
            </tr>
            <tr>
                <th colspan="1" width="15%">违法事实</th>
                <th colspan="8" align="left">
                    &emsp;&emsp;{{case_handing_data_storage.year}}年{{case_handing_data_storage.month}}月{{case_handing_data_storage.day}}日,我局专卖执法人员在闽侯县进行市场检查,检查至{{case_handing_data_storage.mer_address}},
                    依法对{{case_handing_data_storage.mer_name}}的当事人{{case_handing_data_storage.tir_person}}出示执法检查证件表明身份后，依法对该店铺进行检查，在该店卷烟柜台内发现一批未印有“由中国烟草总公司专卖”字样的外国卷烟，品种数量如下：
                    {{case_handing_data_storage.ciga_data_all}}，总计{{case_handing_data_storage.tce_type_number_chinese}}品种{{case_handing_data_storage.tce_number_chinese}}（具体品种详见先行登记保存通知书，单号：{{case_handing_data_storage.evi_data_all}}）。
                    由于当事人无法提供购买该批卷烟的合法有效证明，涉嫌{{case_handing_data_storage.illegal_behavior}}的行为。为了保全证据，我局专卖执法人员对现场执法情况拍照留证，经本局领导批准同意，我局专卖执法人员依法对上述卷烟予以先行登记保存，同时制作检查（勘验）笔录，交当事人{{case_handing_data_storage.tir_person}}核对无异议后签字确认。<br>
                    &emsp;&emsp;本局于{{case_handing_data_storage.year}}年{{case_handing_data_storage.month}}月{{case_handing_data_storage.day}}日对该案进行立案调查。{{case_handing_data_storage.year1}}年{{case_handing_data_storage.month1}}月{{case_handing_data_storage.day1}}日
                    {{case_handing_data_storage.tir_person}}前来我局接受询问调查。现查实：当事人为了牟取非法利益，{{case_handing_data_storage.cigarette_origin}}我局卷烟真伪鉴别小组，鉴定该批涉案卷烟{{case_handing_data_storage.evi_ciga_t}}、{{case_handing_data_storage.evi_ciga_f}}，
                    当事人对鉴别结论没有异议。因当事人未供述购进价格，无法提供相关账册发票等证据进行印证,故我局核价小组根据福建省烟草专卖局公布的价格信息，以案发当日作为核价基准日进行计算，核定违法卷烟价值计人民币{{case_handing_data_storage.tce_amount_chinese}}(人民币{{case_handing_data_storage.tce_amount}}元)。<br>
                    &emsp;&emsp;以上事实，有下列我局执法人员采集的与本案相关的证据为证：<br>
                    &emsp;&emsp;证据（一）我局专卖执法人员制作的关于当事人经营场所《检查（勘验）笔录》一份，证明当事人从事违规卷烟销售及现场检查情况。<br>
                    &emsp;&emsp;证据（二）我局专卖执法人员制作的《先行登记保存批准书》（{{case_handing_data_storage.evi_data_all_1}}），《先行登记保存通知书》（{{case_handing_data_storage.evi_data_all}}）各{{case_handing_data_storage.num1}}份，证明当事人经营场所查获涉案卷烟的品种、规格及数量。<br>
                    &emsp;&emsp;证据（三）我局专卖执法人员现场拍摄的当事人经营场所及卷烟等《现场照片》一组，证明当事人经营场所现场及卷烟有关情况。<br>
                    &emsp;&emsp;证据（四）当事人来接受调查时提供的当事人身份证复印件一份，烟草专卖零售许可证复印件一份，证明当事人从业资格、身份。<br>
                    &emsp;&emsp;证据（五）当事人来接受调查时，我局执法人员制作并由当事人签字确认的《询问（调查）笔录》一份，证明当事人从事违规卷烟进销的具体情况。<br>
                    &emsp;&emsp;证据（六）我局卷烟真伪鉴别小组对涉案卷烟进行鉴别，制作并由当事人签字确认的《卷烟产品鉴别书》一份，证明该批卷烟的真假性。<br>
                    &emsp;&emsp;证据（七）我局卷烟价格核价小组制作涉案物品核价表一份，证明该批卷烟价格情况。<br>
                    &emsp;&emsp;以上事实清楚，证据确凿，足以认定当事人{{case_handing_data_storage.tir_person}}的行为违反了{{case_handing_data_storage.violate_law}}的规定，构成了{{case_handing_data_storage.illegal_behavior}}的事实。
                </th>
            </tr>
            <tr>
                <th colspan="1" width="15%" height="50px" a>处罚依据</th>
                <th colspan="8" align="left">{{case_handing_data_storage.punish_basis}}</th>
            </tr>
            <tr>
                <th colspan="1" width="15%"><strong>承办人意见</strong></th>
                <th colspan="8" align="left">
                    &emsp;&emsp;根据违法事实，当事人{{case_handing_data_storage.tir_person}}截止目前两年内累计犯案次数：{{case_handing_data_storage.crime_number}}次；在{{case_handing_data_storage.illegal_behavior}}行为中，违规数量：{{case_handing_data_storage.tce_number_chinese}},
                    违规金额：{{case_handing_data_storage.tce_amount_chinese}}(人民币{{case_handing_data_storage.tce_amount}}元)；<br>
                    &emsp;&emsp;对当事人{{case_handing_data_storage.tir_person}}{{case_handing_data_storage.illegal_behavior}}的行为按照{{case_handing_data_storage.discretionary_standard_name}}对应裁量标准，划分为{{case_handing_data_storage.discretionary_standard_grade}}
                    ,{{case_handing_data_storage.discretionary_standard_punish}}<br>
                    &emsp;&emsp;建议责令当事人停止并改正上述行为。并依据{{case_handing_data_storage.punish_basis}}的规定，决定处罚如下：<br>
                    &emsp;&emsp;对当事人{{case_handing_data_storage.tir_person}}{{case_handing_data_storage.illegal_behavior}}的违法行为，{{case_handing_data_storage.penalty_decision}},对涉案违法卷烟{{case_handing_data_storage.tce_number_chinese}}，每条卷烟{{case_handing_data_storage.penalty_money}}元处以罚款，
                    计人民币{{case_handing_data_storage.penalty_money_all}}元（人民币{{case_handing_data_storage.penalty_money_all_chinese}}元）<br>
                    签字：{{case_handing_data_storage.undertaker1_name}}&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;执法证号：{{case_handing_data_storage.staff_license_no_1}}<br>
                    &emsp;&emsp;&emsp;{{case_handing_data_storage.undertaker2_name}}&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;执法证号：{{case_handing_data_storage.staff_license_no_2}}
                    <div align="right">
                        {{case_handing_data_storage.year2}}年{{case_handing_data_storage.month2}}月{{case_handing_data_storage.day2}}日
                    </div>
                </th>
            </tr>
            <tr>
                <th colspan="1" width="15%">承办部门意见</th>
                <th colspan="8" height="80px" valign="bottom">
                    <div align="center" >
                        部门负责人签字：
                    </div><br>
                    <div align="right" >
                        年&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;月&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;日
                    </div>
                </th>
            </tr>
            <tr>
                <th colspan="1" width="15%">法制员意见</th>
                <th colspan="8" height="80px" valign="bottom">
                    <div align="center" >
                        法制员签字：
                    </div><br>
                    <div align="right" >
                        年&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;月&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;日
                    </div>
                </th>
            </tr>
            <tr>
                <th colspan="1" width="15%">领导审批意见</th>
                <th colspan="8" height="80px" valign="bottom">
                    <div align="center" >
                        领导签字：
                    </div><br>
                    <div align="right" >
                        年&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;月&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;日
                    </div>
                </th>
            </tr>
            <tr>
                <th colspan="1" width="15%" height="50px">备注</th>
                <th colspan="8"></th>
            </tr>
        </table>
        </body>
        </html>
        <template #footer>
				<span class="dialog-footer">
					<el-button @click="View_case_handing_Visible = false">取 消</el-button>
          <el-button type="primary" :icon="Printer" @click="create_case_handing_word">打 印</el-button>
				</span>
        </template>
    </el-dialog>

    </div>

</template>

<script setup lang="ts" name="basetable">
import { ref, reactive } from 'vue';
import { ElMessage, ElMessageBox } from 'element-plus';
import { Delete, Edit, Search, Plus,Printer } from '@element-plus/icons-vue';
import {
    case_evi_Create,
    case_evi_Views,
    case_legal_Create,
    ciga_evudence_Create,
    end_record_data,
    evi_Views,
    fetchData_case,
    fetchData_case_Create,
    fetchData_case_update,
    fetchData_legal_clause,
    fetchData_mer,
    fetchData_s_mongodb_evidence_Cre,
    fetchData_s_mongodb_evidence_Views,
    fetchData_tobacco,
    fetchData_user,
    illegal_record_data,
    illegal_record_Search,
    mer_Create,
    mer_search_api,
    review_price_data,
    staff_evidence_create,
    staff_evidence_data,
    end_record_show,
    record_inquiry_show,
    record_inquiry_print,
    case_evidence_Views,
    case_evidence_Edit,
    question_answer_clause_delete,
    price_review_clause_delete,
    fetchData_user_Edit,
    fetchData_price_Edit,
    fetchData_interrogator_clause,
    fetchData_discretionary_clause,
    case_handing_data,
    fetchData_collective_discuss_Confirm,
    fetchData_case_handing_Confirm,
    case_handing_browse_data
} from '../api/index';
import {
    export_word_14, export_word_5,
} from './table_inquiry.vue'

//案件表数据
interface TableItem {
    case_id:number,
    date_of_filing:string,
    date_of_closing:string,
    date_of_archive:string,
    case_source:string,
    case_number:string,
    archive_person:string,
    case_update_time:string,
    ase_type:string,
    case_remark:string,
    tcs_note_id:string,
    ciga_flag:string,
    ciga_num_flag:string,
    mer_flag:string,
}

//案件暂存数据
const create_case = reactive({
    case_id:0,
    staff_evi_id:0,
    staff_id:0,
    staff_evi_send_per:'',
    staff_evi_check_per1:'',
    staff_evi_check_per2:'',
    staff_evi_send_time:'',
    staff_evi_send_unit:'',
    staff_evi_send_result:'',
    staff_evi_rec_address:'',
    staff_evi_status:'',
    staff_evi_per_note:'',
    mer_flag:'',
    ciga_num_flag:'',
    ciga_flag:'',
    test:[],
    img_data:'',
    standard:'',
    tir_id:0,
    tlc_id:0,
    illegal_behavior:'',
    evi_id_number:'',
    evi_id:'',
    date_of_filing:'',
    date_of_closing:'',
    date_of_archive:'',
    case_source:'',
    case_number:'',
    archive_person:'',
    case_update_time:'',
    case_type:'',
    case_remark:'',
    mer_id:0,
    tcs_note:'',
    tce_time:'',
    tce_number:0,
    tce_amount:0,
    tce_remark:'',
    tce_address:'福建省福州市闽侯县烟草专卖局',
    evi_number:0,//数量(条)
    ciga_variety:'',//品种
    barcode:'',//条形码
    ciga_model:'',//规格型号
    ciga_price:0,//单价
    inkjet:'',//
    mer_format:'',
    mer_address:'',
    mer_person:'',
    mer_record:'',
    date_of_record:'',
    date_of_effect:'',
    date_of_issue:'',
    mer_hometown:'',
    mer_id_number:'',
    mer_tel:'',
    business_licence_code:'',
    licence_state:'',
    storage_address:'',
    retail_licence_code:'',
    category:'',
    area_id:0,
    mer_zip_code:0,
    mer_name:'',
    remark:'',
});
//获取商户数据用作选项框
interface mer_data {
    mer_id: number,
    mer_format: string,
    mer_address: string,
    mer_person: string,
    mer_record: string,
    date_of_record: string,
    date_of_effect: string,
    date_of_issue: string,
    mer_hometown: string,
    mer_id_number: string,
    mer_tel: string,
    business_licence_code: string,
    licence_state: string,
    storage_address: string,
    retail_licence_code: string,
    category: string,
    area_id: number,
    mer_zip_code: number,
    mer_name: string,
}
const mer_Data = ref<mer_data[]>([]);
const get_mer_opinion = (mer_name:string='',licence_state:string='',mer_person:string='' ,mer_id:number,business_licence_code:string='') =>{
    fetchData_mer(mer_name,licence_state,mer_person,mer_id,business_licence_code).then(res =>{
        mer_Data.value = res.data.data;
    })
}
get_mer_opinion();
//获取执法人员数据作为选择框
interface staff_data{
    staff_id:number,
    staff_name:string,
    staff_gender:string,
    staff_birthday:string,
    staff_ethnicity:string,
    staff_edu_bg:string,
    staff_email:string,
    field_staff_identity_card:string,
    staff_hometown:string,
    staff_degree:string,
    staff_political_status:string,
    staff_post:string,
    staff_account_no:string,
    staff_account_pwd:string,
    staff_starting_time:string,
    staff_authorized:string,
    staff_phone:string,
    staff_tel:string,
    staff_e_sign:string,
    staff_small_number:string,
    staff_license_no:string,
    staff_now_work_degree:string,
    staff_now_evaluate_degree:string,
}
const staff_Data = ref<staff_data[]>([]);
const get_staff_opinion1 = () =>{
    fetchData_user('','','').then(res=>{
        staff_Data.value = res.data.data;
    })
}
get_staff_opinion1();

//获取案由信息数据用作选项框
interface illegal_data {
    tlc_id:number,
    illegal_behavior:string,
    standard:string,
    penalty_range:string,
    statutory_penalty:string,
    grade:string,
    remark:string,
}
const illegal_Data = ref<illegal_data[]>([]);
const get_legal_clause_opinion = (illegal_behavior:string='',standard:string='' ,grade:string='',tlc_id:number) =>{
    fetchData_legal_clause(illegal_behavior, standard,grade,tlc_id).then(res =>{
        illegal_Data.value = res.data.data;
    })
}
get_legal_clause_opinion();


//视图/

const Ratification_Visible = ref(false);                              //批准书视图
const Ratification_Edit_Visible = ref(false);                         //批准书修改视图
const Advice_note_Visible = ref(false);                               //通知书视图
const Advice_note_Views_Visible = ref(false);                         //查看通知书视图
const Price_list_Visible = ref(false);                                //核价表视图
const Price_list_Browse_Visible = ref(false);                                //核价表视图
const Case_handing_approve_Visible=ref(false);                        //案件处理审批表视图
const View_case_handing_Visible=ref(false);                                 //案件处理审批表预览视图






const case_handling_tabel=(row:any)=>{
    case_handing_data_storage.case_cause=''
    create_case.case_id=row.case_id;
    get_case_handing_data_storage(row);
    Case_handing_approve_Visible.value=true;
}

//案件处理审批表暂存数据
const case_handing_data_storage=reactive({
    case_cause:'',
    case_number:'',
    year:'',
    month:'',
    day:'',
    case_time:'',
    name:'',
    statutory_responsible_person:'',//法定负责人
    address:'',
    tel:'',
    tir_person:'',
    tir_gender:'',
    tir_nation:'',
    tir_id_number:'',
    retail_licence_code:'',
    telephone_number:'',
    crime_number:'',
    mer_address:'',
    mer_name:'',
    tce_type_number_chinese:'',
    tce_number_chinese:'',
    tce_type_number:0,
    tce_number:0,
    evi_data_all:'',//先行保存通知书号
    evi_data_all_1:'',//先行保存批准书号
    conspirator:'',//同案人
    ciga_data_all:'',//卷烟品种
    ciga_data_f:'',//假烟
    ciga_data_t:'',//真烟
    evi_ciga_f:'',
    evi_ciga_t:'',
    tce_amount:0,
    tce_amount_chinese:'',//价格中文写法
    num1:0,
    num2:0,
    year1:'',
    month1:'',
    day1:'',
    year2:'',
    month2:'',
    day2:'',
    // year3:'',
    // month3:'',
    // day3:'',
    tir_home:'',
    undertaker1:'',
    undertaker2:'',
    undertaker1_name:'',
    undertaker2_name:'',
    staff_license_no_1:'',
    staff_license_no_2:'',
    write_time:'',
    cigarette_origin:'',
    violate_law:'',
    punish_basis:'',//处罚依据
    discretionary_standard_name:'',//裁量标准
    discretionary_standard_grade:'',
    discretionary_standard_punish:'',
    discretionary_standard:'',
    penalty_money:'',//罚款
    penalty_decision:'',
    list1:[],
    list2:[],
    list3:[],
    list4:[],
    list5:[],
    list6:[],
    list7:[],
    penalty_money_all:0,
    penalty_money_all_chinese:'',
    tce_type_number_t_chinese: "",
    tce_number_t_chinese: "",
    tce_type_number_f_chinese: "",
    tce_number_f_chinese: "",
    illegal_behavior:'',
    evi_data_t : '',
    evi_data_f : '',
})

const get_case_handing_data_storage=(row:any)=>{
    case_handing_data(row.case_id).then(res=>{
        case_handing_data_storage.case_number=res.data.data.case_number,
        case_handing_data_storage.year=res.data.data.year,
        case_handing_data_storage.case_time=res.data.data.case_time,
        case_handing_data_storage.tir_person=res.data.data.tir_person,
        case_handing_data_storage.tir_gender=res.data.data.tir_gender,
        case_handing_data_storage.tir_nation=res.data.data.tir_nation,
        case_handing_data_storage.tir_id_number=res.data.data.tir_id_number,
        case_handing_data_storage.retail_licence_code=res.data.data.retail_licence_code,
        case_handing_data_storage.telephone_number=res.data.data.telephone_number,
        case_handing_data_storage.tir_home=res.data.data.tir_home,
        case_handing_data_storage.crime_number=res.data.data.crime_number,
        case_handing_data_storage.cigarette_origin=res.data.data.cigarette_origin,
        case_handing_data_storage.violate_law=res.data.data.violate_law,
        case_handing_data_storage.punish_basis=res.data.data.punish_basis,
        case_handing_data_storage.penalty_decision=res.data.data.penalty_decision
        //案由
        res.data.data.list1.forEach(function (item) {
            case_handing_data_storage.case_cause = case_handing_data_storage.case_cause + item.illegal_behavior + '、'
        });
    })
}

//获取案件处理审批表预览和打印数据
const get_case_handing_browse_data=(row:any)=>{
    case_handing_browse_data(row.case_id).then(res=>{
        //case_handing_data_storage.case_cause=res.data.data.case_cause,
        case_handing_data_storage.illegal_behavior=res.data.data.illegal_behavior
        case_handing_data_storage.year=res.data.data.year,
        case_handing_data_storage.month=res.data.data.month,
        case_handing_data_storage.day=res.data.data.day,
        case_handing_data_storage.case_number=res.data.data.case_number,
        case_handing_data_storage.name=res.data.data.name,
        case_handing_data_storage.statutory_responsible_person=res.data.data.statutory_responsible_person,
        case_handing_data_storage.address=res.data.data.address,
        case_handing_data_storage.tel=res.data.data.tel,
        case_handing_data_storage.tir_person=res.data.data.tir_person,
        case_handing_data_storage.tir_gender=res.data.data.tir_gender,
        case_handing_data_storage.tir_nation=res.data.data.tir_nation,
        case_handing_data_storage.tir_id_number=res.data.data.tir_id_number,
        case_handing_data_storage.retail_licence_code=res.data.data.retail_licence_code,
        case_handing_data_storage.tir_home=res.data.data.tir_home,
        case_handing_data_storage.telephone_number=res.data.data.telephone_number,
        case_handing_data_storage.conspirator=res.data.data.conspirator,
        case_handing_data_storage.mer_address=res.data.data.mer_address,
        case_handing_data_storage.mer_name=res.data.data.mer_name,
        case_handing_data_storage.list2=res.data.data.list2,
        case_handing_data_storage.tce_type_number_chinese=res.data.data.tce_type_number_chinese,
        case_handing_data_storage.tce_number_chinese=res.data.data.tce_number_chinese,
        case_handing_data_storage.list3=res.data.data.list3,
        case_handing_data_storage.cigarette_origin=res.data.data.cigarette_origin,
        case_handing_data_storage.list1=res.data.data.list1,
        case_handing_data_storage.list4=res.data.data.list4,
        case_handing_data_storage.list5=res.data.data.list5,
        case_handing_data_storage.list6=res.data.data.list6,
        case_handing_data_storage.list7=res.data.data.list7,
        case_handing_data_storage.violate_law=res.data.data.violate_law,
        case_handing_data_storage.num1=res.data.data.num1,
        case_handing_data_storage.punish_basis=res.data.data.punish_basis,
        case_handing_data_storage.crime_number=res.data.data.crime_number,
        case_handing_data_storage.tce_amount_chinese=res.data.data.tce_amount_chinese,
        case_handing_data_storage.tce_amount=res.data.data.tce_amount,
        case_handing_data_storage.discretionary_standard_name=res.data.data.discretionary_standard_name,
        case_handing_data_storage.discretionary_standard_grade=res.data.data.discretionary_standard_grade,
        case_handing_data_storage.discretionary_standard_punish=res.data.data.discretionary_standard_punish,
        case_handing_data_storage.penalty_decision=res.data.data.penalty_decision,
        case_handing_data_storage.penalty_money=res.data.data.penalty_money,
        case_handing_data_storage.penalty_money_all=res.data.data.penalty_money_all,
        case_handing_data_storage.penalty_money_all_chinese=res.data.data.penalty_money_all_chinese,
        case_handing_data_storage.tce_type_number_t_chinese=res.data.data.tce_type_number_t_chinese,
        case_handing_data_storage.tce_type_number_f_chinese=res.data.data.tce_type_number_f_chinese,
        case_handing_data_storage.undertaker1_name=res.data.data.undertaker1_name,
        case_handing_data_storage.undertaker2_name=res.data.data.undertaker2_name,
        case_handing_data_storage.staff_license_no_1=res.data.data.staff_license_no_1,
        case_handing_data_storage.staff_license_no_2=res.data.data.staff_license_no_2,
        case_handing_data_storage.year1=res.data.data.year1,
        case_handing_data_storage.month1=res.data.data.month1,
        case_handing_data_storage.day1=res.data.data.day1,
        case_handing_data_storage.year2=res.data.data.year2,
        case_handing_data_storage.month2=res.data.data.month2,
        case_handing_data_storage.day2=res.data.data.day2,
        case_handing_data_storage.tce_number_f_chinese=res.data.data.tce_number_f_chinese,
        case_handing_data_storage.tce_number_t_chinese=res.data.data.tce_number_t_chinese,
        //所有烟草
        res.data.data.list2.forEach(function (item) {
            case_handing_data_storage.ciga_data_all = case_handing_data_storage.ciga_data_all + '“' + item.ciga_model + ' ' + item.ciga_variety +
                '“'+item.evi_number+'条，'
        });
        //所有证据先行保存通知书
        res.data.data.list3.forEach(function (item) {
            case_handing_data_storage.evi_data_all = case_handing_data_storage.evi_data_all + '侯烟存通字【'+ case_handing_data_storage.year +'】第'+
                item.evi_id_number + '号、'
        });
        //所有证据先行保存通知书
        res.data.data.list3.forEach(function (item) {
            case_handing_data_storage.evi_data_all_1 = case_handing_data_storage.evi_data_all_1 + '侯烟存准【'+ case_handing_data_storage.year +'】第'+
                item.evi_id_number + '号、'
        });

        // 真烟
        res.data.data.list6.forEach(function (item) {
            case_handing_data_storage.ciga_data_t = case_handing_data_storage.ciga_data_t + '“' + item.ciga_model + ' ' + item.ciga_variety +
                '“'+item.evi_number+'条，'
        });

        //真烟数据＋先行保存通知书
        if (case_handing_data_storage.ciga_data_t){
            case_handing_data_storage.evi_ciga_t = "鉴定卷烟"+ case_handing_data_storage.ciga_data_t +  "总计"+ case_handing_data_storage.tce_type_number_t_chinese +
                "品种" + case_handing_data_storage.tce_number_t_chinese + case_handing_data_storage.evi_data_t +"为真品卷烟";
        }
        res.data.data.list4.forEach(function (item) {
            case_handing_data_storage.ciga_data_f = case_handing_data_storage.ciga_data_f + '“' + item.ciga_model + ' ' + item.ciga_variety +
                '“'+item.evi_number+'条，'
        });
        //假烟数据＋先行保存通知书
        if (case_handing_data_storage.ciga_data_f){
            case_handing_data_storage.evi_ciga_f = "鉴定卷烟"+ case_handing_data_storage.ciga_data_f +  "总计"+ case_handing_data_storage.tce_type_number_f_chinese+
                "品种" + case_handing_data_storage.tce_number_f_chinese  + case_handing_data_storage.evi_data_f +"为假冒注册商标且伪劣卷烟";
        }

    })
}

const create_case_handing_word=()=>{
    case_handing_browse_data(create_case.case_id).then(res=>{
        case_handing_data_storage.list2=res.data.data.list2,
        case_handing_data_storage.list3=res.data.data.list3,
        case_handing_data_storage.list1=res.data.data.list1,
        case_handing_data_storage.list4=res.data.data.list4,
        case_handing_data_storage.list5=res.data.data.list5,
        case_handing_data_storage.list6=res.data.data.list6,
        case_handing_data_storage.list7=res.data.data.list7,
        //所有烟草
        res.data.data.list2.forEach(function (item) {
            case_handing_data_storage.ciga_data_all = case_handing_data_storage.ciga_data_all + '“' + item.ciga_model + ' ' + item.ciga_variety +
                '“'+item.evi_number+'条，'
        });
        //所有证据先行保存通知书
        res.data.data.list3.forEach(function (item) {
            case_handing_data_storage.evi_data_all = case_handing_data_storage.evi_data_all + '侯烟存通字【'+ case_handing_data_storage.year +'】第'+
                item.evi_id_number + '号、'
        });
        //所有证据先行保存通知书
        res.data.data.list3.forEach(function (item) {
            case_handing_data_storage.evi_data_all_1 = case_handing_data_storage.evi_data_all_1 + '侯烟存准【'+ case_handing_data_storage.year +'】第'+
                item.evi_id_number + '号、'
        });

        // 真烟
        res.data.data.list6.forEach(function (item) {
            case_handing_data_storage.ciga_data_t = case_handing_data_storage.ciga_data_t + '“' + item.ciga_model + ' ' + item.ciga_variety +
                '“'+item.evi_number+'条，'
        });

        //真烟数据＋先行保存通知书
        if (case_handing_data_storage.ciga_data_t){
            case_handing_data_storage.evi_ciga_t = "鉴定卷烟"+ case_handing_data_storage.ciga_data_t +  "总计"+ case_handing_data_storage.tce_type_number_t_chinese +
                "品种" + case_handing_data_storage.tce_number_t_chinese + case_handing_data_storage.evi_data_t +"为真品卷烟";
        }
        res.data.data.list4.forEach(function (item) {
            case_handing_data_storage.ciga_data_f = case_handing_data_storage.ciga_data_f + '“' + item.ciga_model + ' ' + item.ciga_variety +
                '“'+item.evi_number+'条，'
        });
        //假烟数据＋先行保存通知书
        if (case_handing_data_storage.ciga_data_f){
            case_handing_data_storage.evi_ciga_f = "鉴定卷烟"+ case_handing_data_storage.ciga_data_f +  "总计"+ case_handing_data_storage.tce_type_number_f_chinese
                + case_handing_data_storage.tce_number_f_chinese + "（" + case_handing_data_storage.evi_data_f +"为假冒注册商标且伪劣卷烟";
        }
        export_word_14(
            res.data.data.illegal_behavior,
            res.data.data.year,
            res.data.data.month,
            res.data.data.day,
            res.data.data.case_number,
            res.data.data.name,
            res.data.data.statutory_responsible_person,
            res.data.data.address,
            res.data.data.tel,
            res.data.data.tir_person,
            res.data.data.tir_gender,
            res.data.data.tir_nation,
            res.data.data.tir_id_number,
            res.data.data.retail_licence_code,
            res.data.data.tir_home,
            res.data.data.telephone_number,
            res.data.data.conspirator,
            res.data.data.mer_address,
            res.data.data.mer_name,
            res.data.data.tce_type_number_chinese,
            res.data.data.tce_number_chinese,
            res.data.data.year1,
            res.data.data.month1,
            res.data.data.day1,
            res.data.data.cigarette_origin,
            res.data.data.violate_law,
            res.data.data.num1,
            res.data.data.punish_basis,
            res.data.data.crime_number,
            res.data.data.tce_amount_chinese,
            res.data.data.tce_amount,
            res.data.data.discretionary_standard_name,
            res.data.data.discretionary_standard_grade,
            res.data.data.discretionary_standard_punish,
            res.data.data.penalty_decision,
            res.data.data.penalty_money,
            res.data.data.penalty_money_all,
            res.data.data.penalty_money_all_chinese,
            res.data.data.undertaker1_name,
            res.data.data.undertaker2_name,
            res.data.data.staff_license_no_1,
            res.data.data.staff_license_no_2,
            res.data.data.year2,
            res.data.data.month2,
            res.data.data.day2,
            res.data.data.tce_number_f_chinese,
            res.data.data.tce_number_t_chinese,
            res.data.data.list1,
            res.data.data.list2,
            res.data.data.list3,
            res.data.data.list4,
            res.data.data.list5,
            res.data.data.list6,
            res.data.data.list7,
            case_handing_data_storage.ciga_data_all,
            case_handing_data_storage.evi_data_all,
            case_handing_data_storage.evi_data_all_1,
            case_handing_data_storage.ciga_data_t,
            case_handing_data_storage.evi_ciga_t,
            case_handing_data_storage.ciga_data_f,
            case_handing_data_storage.evi_ciga_f,
            res.data.data.tce_type_number_t_chinese,
            res.data.data.tce_type_number_f_chinese,
        )
    })
}


//案件处理审批
const certain_case_handing_approve=()=>{
    create_case.tcs_note = "案件处理审批已完成"
    fetchData_case_handing_Confirm(
        create_case.case_id,
        case_handing_data_storage.case_cause,
        case_handing_data_storage.name,
        case_handing_data_storage.statutory_responsible_person,
        case_handing_data_storage.address,
        case_handing_data_storage.tel,
        case_handing_data_storage.tir_person,
        case_handing_data_storage.tir_gender,
        case_handing_data_storage.tir_nation,
        case_handing_data_storage.tir_id_number,
        case_handing_data_storage.retail_licence_code,
        case_handing_data_storage.telephone_number,
        case_handing_data_storage.crime_number,
        case_handing_data_storage.conspirator,
        case_handing_data_storage.tir_home,
        case_handing_data_storage.undertaker1,
        case_handing_data_storage.undertaker2,
        case_handing_data_storage.write_time,
        case_handing_data_storage.cigarette_origin,
        case_handing_data_storage.violate_law,
        case_handing_data_storage.punish_basis,
        case_handing_data_storage.discretionary_standard,
        case_handing_data_storage.penalty_money,
        case_handing_data_storage.penalty_decision,
    ).then(res=>{
        if (res.data.message === "success"){
            getData();
            fetchData_case_update(create_case.case_id,create_case.tcs_note).then(res=>{
                if (res.data.message === "success"){
                    ElMessage.success('案件处理审批已完成');
                    getData();
                    Case_handing_approve_Visible.value = false;
                }else {
                    ElMessageBox.confirm('状态更新失败', '提示', {
                        type: 'warning'
                    })
                }
            })
        }else {
            ElMessageBox.confirm('确认失败', '提示', {
                type: 'warning'
            })
        }
    })
}


//获取询问人
interface interrogator_data{
    staff_id:number,
    staff_name:string
}
//获取询问者选择框
const interrogator_Data=ref<interrogator_data[]>([]);
const get_interrogator_clause_opinion=(staff_id:number,staff_name:string='')=>{
    fetchData_interrogator_clause(staff_id,staff_name).then(res=>{
        interrogator_Data.value=res.data.data;
    })
}
get_interrogator_clause_opinion()


//裁量标准
interface discretionary_standard_data{
    discretionary_id:number,
    law_name:string,
    grade:string,
    punish:string,
    law_name_grade_punish:string
}
const discretionary_standard_Data=ref<discretionary_standard_data[]>([]);
const get_discretionary_standard_clause_opinion=(discretionary_id:number,law_name:string='',grade:string='',punish:string='',law_name_grade_punish:string='')=>{
    fetchData_discretionary_clause(discretionary_id,law_name,grade,punish,law_name_grade_punish).then(res=>{
        discretionary_standard_Data.value=res.data.data;
    })
}
get_discretionary_standard_clause_opinion()


interface Evidence_ciga_data {
    case_id:number,
    evi_number:number,
    ciga_variety:string,
    barcode:string,
    ciga_model:string,
    ciga_price:number,
    inkjet:string,
    evi_id_number:string,

}
const case_handling_tabel_browse = (row:any) =>{
    create_case.case_id = row.case_id;
    case_handing_data_storage.ciga_data_all=''
    case_handing_data_storage.evi_data_all =''
    case_handing_data_storage.evi_data_all_1=''
    case_handing_data_storage.ciga_data_t =''
    case_handing_data_storage.evi_ciga_t =''
    case_handing_data_storage.ciga_data_f =''
    case_handing_data_storage.evi_ciga_f=''
    get_case_handing_browse_data(row);
    View_case_handing_Visible.value=true;
}



const img_form_data = reactive({
    case_number: '',
    name:'',
    content:'',
    remark:'',
    img:'',
});
const img = [];
const handleChange = (file) =>{
    img.push(file);
}
const handleRemove = (file) =>{
    img.forEach(function (item,index,arr){
        if (item.name == file.name){
            img.splice(index,1)
        }
    })
}


const advice_note_views = (row:any) =>{
    img_form_data.case_number = row.case_number;
    fetchData_s_mongodb_evidence_Views(row.case_number,"证据先行保存通知书").then(res => {
        img_form_data.img=res.data.data[0].img
        console.log(img_form_data.img)

    });
    Advice_note_Views_Visible.value=true;
}


const query = reactive({
    case_id:0,
    case_source:'',
    case_type:'',
    tcs_note_id:'',
    case_number:'',
    pageIndex: 1,
    pageSize: 10
});
const tableData = ref<TableItem[]>([]);
const tableList = ref<TableItem[]>([]); // 用于存放分页数据的列表
const pageTotal = ref(0);
const name = localStorage.getItem('ms_username');
// 获取表格数据
const getData = (archive_person:string='',case_id:number,case_source:string='',case_type:string='',case_number:string='',tcs_note_id:string='',name:string='') => {
    fetchData_case(archive_person,case_id,case_source,case_type,case_number,tcs_note_id,name).then(res => {
        tableData.value = res.data.data.filter((i: { tcs_note_id: string; }) =>(
            i.tcs_note_id =="无证经营公示已完成" ||
            i.tcs_note_id=="案件处理审批已开始"||
            i.tcs_note_id=="听证已完成"||
            i.tcs_note_id=="案件处理审批已完成"||
            i.tcs_note_id=="行政处罚事先告知书确认完成"||
            i.tcs_note_id=="行政处罚事先告知书已完成"||
            i.tcs_note_id=="行政处罚决定书确认完成"||
            i.tcs_note_id=="行政处罚决定书已完成"||
            i.tcs_note_id=="行政罚款收据上传完成"||
            i.tcs_note_id=="行政罚款收据已完成"||
            i.tcs_note_id=="结案报告表已完成"||
            i.tcs_note_id=="已完成"

        )  )
      tableList.value = [];
      pageTotal.value = tableData.value.length ;
      // 根据页码确定下标位置
      const index: number = query.pageIndex * query.pageSize - query.pageSize;
      for (let i = index; i < index + query.pageSize; i++) {
        // 防止数组下标越界
        if (i <= tableData.value.length - 1) {
          tableList.value.push(tableData.value[i])
        } else {
          // 越界就不再循环
          break;
        }
      }
    });
};
getData('','','','','','',localStorage.getItem('ms_username'));
// 查询操作
const handleSearch = (case_number:string='',tcs_note_id:string='',case_source:string='',case_type:string='') => {
    getData('','',case_source,case_type,case_number,tcs_note_id,name);
};
// 分页导航
const handlePageChange = (val: number) => {
  query.pageIndex = val;
    getData('','','','','','',localStorage.getItem('ms_username'));
};
</script>

<style scoped>
.handle-box {
    margin-bottom: 20px;
}
.handle-box button{
    background-color: #00a854;
}

.handle-select {
    width: 120px;
}

.handle-input {
    width: 300px;
}
.table {
    width: 100%;
    font-size: 14px;
}
.red {
    color: #ff0000;
}

:deep(.avatar){
    width: 100px;
    height: 100px;
}
.blue {
    color: rgba(0, 118, 252, 0.79);
}
.mr10 {
    margin-right: 10px;
}
.table-td-thumb {
    display: block;
    margin: auto;
    width: 40px;
    height: 40px;
}
.dialog-footer button{
    background-color: #00a854;
    color:white;
}
/*#inspect_record{*/
/*  position: relative;*/
/*  left: 0px;*/
/*  top: -20px;*/

/*}*/

/*#filing_report_review{*/
/*  position: relative;*/
/*  left: 0px;*/
/*  top: -22px;*/
/*}*/
</style>
